## --------------------------------------------------------------------
## ykit FAPack
## --------------------------------------------------------------------


    set(SOURCES_files_SourceFiles
      fileEnum.cpp	  
	  fileEnum.h	  
	  zpCmd.cpp	  
	  zpExplorer.h	  
	  zpExplorer.cpp
	  )
    source_group("Source Files" FILES ${SOURCES_files_SourceFiles})
	
	
    set(SOURCES_files_pack
      ${PROJECT_SOURCE_DIR}/inc/FAPack/WriteCompressFile.cpp
	  ${PROJECT_SOURCE_DIR}/inc/FAPack/zpack.cpp
	  ${PROJECT_SOURCE_DIR}/inc/FAPack/zpCompressedFile.cpp
	  ${PROJECT_SOURCE_DIR}/inc/FAPack/zpFile.cpp  
	  ${PROJECT_SOURCE_DIR}/inc/FAPack/zpPackage.cpp  
	  ${PROJECT_SOURCE_DIR}/inc/FAPack/ZpWriteCompressFile.cpp  
	  ${PROJECT_SOURCE_DIR}/inc/FAPack/zpWriteFile.cpp  
	  ${PROJECT_SOURCE_DIR}/inc/FAPack/WriteCompressFile.h
	  ${PROJECT_SOURCE_DIR}/inc/FAPack/zpack.h
	  ${PROJECT_SOURCE_DIR}/inc/FAPack/zpCompressedFile.h
	  ${PROJECT_SOURCE_DIR}/inc/FAPack/zpFile.h
	  ${PROJECT_SOURCE_DIR}/inc/FAPack/zpPackage.h
	  ${PROJECT_SOURCE_DIR}/inc/FAPack/ZpWriteCompressFile.h
	  ${PROJECT_SOURCE_DIR}/inc/FAPack/zpWriteFile.h
    )
    source_group("Source Files\\pack" FILES ${SOURCES_files_pack})

	
    set(SOURCES_files_zlib
	
	  #zlib
	  ${PROJECT_SOURCE_DIR}/inc/zlib/adler32.c
      ${PROJECT_SOURCE_DIR}/inc/zlib/compress.c
      ${PROJECT_SOURCE_DIR}/inc/zlib/crc32.c
      ${PROJECT_SOURCE_DIR}/inc/zlib/deflate.c
      ${PROJECT_SOURCE_DIR}/inc/zlib/infback.c
      ${PROJECT_SOURCE_DIR}/inc/zlib/inffast.c
      ${PROJECT_SOURCE_DIR}/inc/zlib/inflate.c
      ${PROJECT_SOURCE_DIR}/inc/zlib/inftrees.c
      ${PROJECT_SOURCE_DIR}/inc/zlib/trees.c
      ${PROJECT_SOURCE_DIR}/inc/zlib/uncompr.c
      ${PROJECT_SOURCE_DIR}/inc/zlib/zutil.c
      ${PROJECT_SOURCE_DIR}/inc/zlib/crc32.h
      ${PROJECT_SOURCE_DIR}/inc/zlib/deflate.h
      ${PROJECT_SOURCE_DIR}/inc/zlib/inffast.h
      ${PROJECT_SOURCE_DIR}/inc/zlib/inffixed.h
      ${PROJECT_SOURCE_DIR}/inc/zlib/inflate.h
      ${PROJECT_SOURCE_DIR}/inc/zlib/inftrees.h
      ${PROJECT_SOURCE_DIR}/inc/zlib/trees.h
      ${PROJECT_SOURCE_DIR}/inc/zlib/zconf.h
      ${PROJECT_SOURCE_DIR}/inc/zlib/zconf.in.h
      ${PROJECT_SOURCE_DIR}/inc/zlib/zlib.h
      ${PROJECT_SOURCE_DIR}/inc/zlib/zlibEx.h
      ${PROJECT_SOURCE_DIR}/inc/zlib/zutil.h
	)
    source_group("Source Files\\zlib" FILES ${SOURCES_files_zlib})
	

    set(SOURCES_SourceFiles
      ${SOURCES_files_SourceFiles}
      ${SOURCES_files_pack}
      ${SOURCES_files_zlib}
    )


  set(SOURCES_
    ${SOURCES_SourceFiles}
  )
    
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/inc)
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/inc/zlib)
#INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/inc/FAPack)
#INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/inc/libevent)

  if(WIN32)	
   SET(CMAKE_CXX_FLAGS_DEBUG "/MDd /Z7 /Od")
   SET(CMAKE_CXX_FLAGS_RELEASE "/MD /O2")
   SET(CMAKE_CXX_FLAGS_MINSIZEREL "/MD /O2")
   SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MDd /Z7 /Od")
endif(WIN32)

SET(ProjectName FAPack)

#MESSAGE(STATUS "This is BINARY dir " ${${ProjectName}_BINARY_DIR}) 
#MESSAGE(STATUS "This is SOURCE dir " ${${ProjectName}_SOURCE_DIR}) 
#SET(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR})
#SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR})
SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/bin)
LINK_DIRECTORIES(${PROJECT_SOURCE_DIR}/lib)
#SET(CMAKE_EXE_LINKER_FLAGS /NODEFAULTLIB:\"LIBCMTD.lib\")

ADD_EXECUTABLE(${ProjectName} ${SOURCES_})
#Add_Definitions(-DSTRATEGYARBITRAGEA_EXPORTS)
#Add_Definitions(-DUNICODE -D_UNICODE)

#ADD_DEPENDENCIES(${ProjectName} FAPack)
#TARGET_LINK_LIBRARIES(${ProjectName} FAPack)

if(NOT WIN32)
add_definitions(-D_PORT_VERSION -Wno-deprecated  -fPIC)
if(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE STREQUAL "Release" OR "MinSizeRel" OR "RelWithDebInfo")
add_definitions(-DNDEBUG)
endif(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE STREQUAL "Release" OR "MinSizeRel" OR "RelWithDebInfo")
endif(NOT WIN32)
